#include <cstdio>
#include <vector>
#include <cmath>
using namespace std;
struct node{
    vector<int> next;
};
vector<node> v;
static double P, r;
static int ans, maxDepth = -1;
void dfs(int index, int depth)
{
    double price;
    if(v[index].next.empty())
    {
        //price = P * pow(1 + r, depth);//No need to calculate it here!!!
        if(depth > maxDepth){
            maxDepth = depth;
            ans = 1;
        }else if(depth == maxDepth){
            ++ans;
        }
    }else{
        int size = v[index].next.size();
        for(int i = 0; i < size; i++)
            dfs(v[index].next[i], depth + 1);
    }
}
int main()
{
    int N;
    int root;
    scanf("%d%lf%lf", &N, &P, &r);
    r /= 100;
    //build the binery tree
    v.resize(N);//Allocate the changable vector
    int supp;
    for(int i = 0; i < N; ++i)
    {
        scanf("%d", &supp);   
        if(-1 == supp)
        {
            root = i;
        }else{
            v[supp].next.push_back(i);               
        }
    }
    //find out the answer
    dfs(root, 0);
    printf("%.2lf %d\n", P * pow(1 + r, maxDepth), ans);
    return 0;
}